﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Salary
{
    [NHibernateEntity(Table = "Transactions")]
    public class Transaction : ITrackable
    {
        public Transaction() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }

        [BelongsTo(Column = "ID_AccountingMonth")]
        public virtual AccountingMonth AccountingMonth { get; set; }

        [BelongsTo(Column = "ID_Employee")]
        public virtual Employee Employee { get; set; }

        [BelongsTo(Column = "ID_TransactionDefinition")]
        public virtual TransactionDefinition Definition { get; set; }

        [Property]
        public virtual double GrossValue { get; set; }

        [BelongsTo(Column = "ID_Currency")]
        public virtual Currency Currency { get; set; }

        [Property]
        public virtual string CostCenter { get; set; }


        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }
}
